#ifndef GET_H

#define GET_H
#include <string>
//#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv2/opencv.hpp>
#include <boost/filesystem.hpp>
#include <vector>

using namespace std;
using namespace cv;
using namespace boost::filesystem;

typedef vector<path> PATHS;

class Getter
{
public:
	Getter();
	virtual ~Getter();
	virtual bool NextImg(Mat & img) = 0;
	virtual bool IsReady() = 0;

private:
	
};

class CamGetter:public Getter
{
public:
	CamGetter();
	~CamGetter();
	bool NextImg(Mat & img);
	bool IsReady();
private:
	VideoCapture capture;

};

class DirGetter:public Getter
{
public:
	DirGetter(string const & dir_path);
	bool IsReady();
	bool NextImg(Mat & img);
	path GetNowFile();
private:
	path begin_dir;
	bool files_inic;
	bool first_time;
	PATHS files;
	PATHS::const_iterator now_file;
	void BuildFiles(path now_path);
};
	
#endif
